package com.indusfo.spc.controller;

import com.indusfo.spc.aspect.SystemControllerLog;
import com.indusfo.spc.pojo.OfflineList;
import com.indusfo.spc.service.OfflineListService;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/offlineList")
public class OfflineListController {

    @Autowired
    private OfflineListService offlineListService;

    /**
     * 查询
     *
     * @param
     * @return com.indusfo.spc.vo.JSONObject
     */
    @RequestMapping(value="/queryOfflineList")
    @SystemControllerLog(description="查询维修子工序")
    @ResponseBody
    public JSONObject queryOfflineList(OfflineList offlineList) {

        JSONObject json = offlineListService.selectAll(offlineList);
        return json;

    }



//    /**
//     * 修改维修子工序
//     *
//     * @param offlineList
//     * @return
//     */
//    @RequestMapping(value = "/updateOfflineList",method= RequestMethod.POST)
//    @SystemControllerLog(description="修改维修子工序")
//    @ResponseBody
//    public JSONObject updateOfflineList (OfflineList offlineList){
//
//        JSONObject json=offlineListService.updateOfflineList(offlineList);
//
//        return json;
//    }




//    /**
//     * 插入
//     *
//     * @return com.indusfo.spc.vo.JSONObject
//     */
//    @RequestMapping(value="/insertOfflineList", method= RequestMethod.POST)
//    @SystemControllerLog(description="新增维修子工序")
//    @ResponseBody
//    public JSONObject insertOfflineList(OfflineList offlineList) {
//
//        JSONObject json = offlineListService.insertOfflineList(offlineList);
//        return json;
//    }





//    /**
//     * 删除
//     *
//     * @param offlineListIds, dataState
//     * @return com.indusfo.spc.vo.JSONObject
//     */
//    @RequestMapping(value="/deleteOfflineList", method= RequestMethod.POST)
//    @SystemControllerLog(description="删除维修子工序")
//    @ResponseBody
//    public JSONObject delOfflineList(Long[] offlineListIds, Integer dataState) {
//
//        dataState = 2;
//        JSONObject json = offlineListService.deleteBldc(offlineListIds, dataState);
//        return json;
//    }

}
